"use strict";
cc._RF.push(module, 'e0be7MaiNJJ+o5b5Nbor/7i', 'CreateIcon');
// scripts/CreateIcon.js

"use strict";

var e = require;
var t = module;
var n = exports;
Object.defineProperty(n, "__esModule", {
  value: !0
});

var o = cc._decorator,
    i = o.ccclass,
    a = o.property,
    r = function (e) {
  __extends(t, e);

  function t() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.triggerBtn = null;
    return t;
  }

  t.prototype.start = function () {
    this.triggerBtn.active = !1;
    SDK.Mgr.Inst.curChannel == SDK.Define.Channel.oppo && !SDK.Mgr.Inst.hasIcon() && SDK.Mgr.Inst.isAdOpen && (this.triggerBtn.active = !0);
  };

  t.prototype.triggerBtnClick = function () {
    var e = this;
    SDK.Mgr.Inst.createIcon(function (t) {
      if (t) {
        SDK.ToastMgr.Inst.showToast("桌面图标创建成功");
        SDK.Mgr.Inst.event("CreateIconSuccess");
        e.triggerBtn.active = !1;
      } else SDK.ToastMgr.Inst.showToast("Icon创建失败");
    });
  };

  __decorate([a(cc.Node)], t.prototype, "triggerBtn", void 0);

  return __decorate([i], t);
}(cc.Component);

n["default"] = r;

cc._RF.pop();